home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5533 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help with pointer alignment
  5. Date: 08 Feb 1996 03:44:54 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Feb7204454@qcd.lanl.gov>
  8. References: <4fb0op$8l8@hermes.louisville.edu>
  9. NNTP-Posting-Host: qcd.lanl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text
  12. In-reply-to: arwild01@homer.louisville.edu's message of 7 Feb 1996 20:06:49 GMT
  13.  
  14. In article <4fb0op$8l8@hermes.louisville.edu>
  15. arwild01@homer.louisville.edu (Alan Wild) writes: 
  16. <snip>
  17.    I am having a small problem with pointer alignment in a library I am
  18.    developing. lint reports:
  19.  
  20.    "queue.c", line 13: warning: possible pointer alignment problem, op CAST
  21.  
  22. lint is posibly at fault here.
  23. <snip>
  24.        queueentry *temp = (queueentry *)malloc( sizeof( queueentry ) );
  25.  
  26. Make sure that you have #included <stdlib.h> (necessary unless you
  27. have otherwise declared malloc), and remove the cast (an advice not
  28. everyone agrees with). 
  29.  
  30. Cheers
  31. Tanmoy
  32. --
  33. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  34. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  35. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  36. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  37. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  38. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  39.